﻿@model WebGioiThieu.Modules.SlideImages.SlideImageItem
@{
    ViewBag.Title = "Thêm ảnh vào slide";
    Layout = "~/Areas/Admin/Views/Shared/_Layout.cshtml";
}

<h2>Thêm</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<div class="item">
    @using (Html.BeginForm("Create", "SlideImages", FormMethod.Post, new { enctype = "multipart/form-data" }))
    {
        @Html.ValidationSummary(true)
        <div class="editor-label">
            Tên
        </div>
        <div class="editor-field">
            @Html.EditorFor(item => Model.Name)
            @Html.ValidationMessageFor(item => Model.Name)
        </div>
        <div class="editor-label">
            Đường dẩn ảnh(hoặc upload ảnh)
        </div>
        <div class="editor-field">
            @Html.EditorFor(item => Model.PictureUrl)
            @Html.ValidationMessageFor(item => Model.PictureUrl)
        </div>
        <div class="editor-label">
            Link liên kết
        </div>
        <div class="editor-field">
            @Html.EditorFor(item => Model.Url)
            @Html.ValidationMessageFor(item => Model.Url)
        </div>
        <div class="editor-label">
            Thứ tự hiển thị
        </div>
        <div class="editor-field">
            @Html.EditorFor(item => Model.DisplayOrder)
            @Html.ValidationMessageFor(item => Model.DisplayOrder)
        </div>
        <div class="editor-label">
            UpLoad:
        </div>
        <div class="editor-field">
            <input type="file" name="file" id="file" accept=".PNG,.JPEG,.JPG,.BMP" />
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    }
    <div>
        @Html.ActionLink("Quay lại danh sách", "Index")
    </div>
</div>

